using Microsoft.Practices.EnterpriseLibrary.Security.Cryptography;
using Web.App.Infrastructure.Security.Contracts;
namespace Web.App.Infrastructure.Security
{
    public class HashService : IHashService
    {
        public bool CompareHash(string value, string valueToCompare)
        {
            return Cryptographer.CompareHash("SHA1Managed", valueToCompare, value);
        }

        public string BuildHash(string valueToBeHashed)
        {
            return Cryptographer.CreateHash("SHA1Managed", valueToBeHashed);
        }
    }
}